﻿
Namespace DGZfP.EventPublisher
    Partial Class UdtSetting
        Inherits SourceTypeSettings

        Public Property LocalResourceFile() As String
            Get
                Return Localization.GetResourceFile(Me, "Udt" + ASCXFileName)
            End Get
            Set(ByVal value As String)

            End Set
        End Property

        Public Overrides Property Source_Setting_50a() As String
            Get
                Return ddlUdts.SelectedValue.Split("|")(0)
            End Get
            Set(ByVal value As String)
                For Each item As ListItem In ddlUdts.Items
                    If item.Value.StartsWith(value & "|") Then
                        ddlUdts.SelectedValue = item.Value
                        Exit For
                    End If
                Next
            End Set
        End Property

        Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
            ddlUdts.DataSource = UdtDataController.GetInstances(Me.PortalSettings.PortalId)
            ddlUdts.DataValueField = "Key"
            ddlUdts.DataTextField = "Value"
            ddlUdts.DataBind()
            MyBase.OnInit(e)

        End Sub

    End Class
End Namespace

